//
//  EngineCallback.h
//  acme_sdk_mac
//
//  Created by liubao on 15/12/7.
//  Copyright (c) 2015年 51talk. All rights reserved.
//

_Pragma("once")
#import "ACME_proxy.h"
@protocol MediaEngineDelegate <NSObject>

-(void)OnEngineEvent:(EngineEvent*)ev;

@end

@interface EngineEventListenerObjc : EngineEventListener
{
    id<MediaEngineDelegate> _delegate;
    void* _proxy;
}
+(EngineEventListenerObjc*)Instance;
-(void)setDelegate:(id<MediaEngineDelegate>) delegate;
-(void)dispatchEvent:(EngineEvent*) ev;
-(void)dispatchTask:(EngineTask*)task;
@end


//add by wuzhaoyang for audio data callback
@protocol AudioDataCallbackDelegate <NSObject>

-(void)OnAudioDataCallbackProcess:(AudioCallbackData*)audiodata;

@end

@interface AudioDataCallbackObjc : EngineAudioDataCallback
{
    id<AudioDataCallbackDelegate> _audiodatacallbackdelegate;
    void* _audiodatacallbackproxy;
}
+(AudioDataCallbackObjc*)Instance;
-(void)setDelegate:(id<AudioDataCallbackDelegate>) delegate;
-(void)dispatchProcess:(AudioCallbackData*)audiodata;

@end

@protocol VideoProcessDataDelegate <NSObject>
-(void) onCaptureVideoFrame: (unsigned char *)frame length: (int)length width: (int)width height: (int)height;
-(void) onRenderVideoFrame: (NSString*)userId frame: (unsigned char *)frame length: (int)length width: (int)width height: (int)height;
@end

@interface VideoProcessCallbackDataObjc : EngineVideoProcessCallback
@property (nonatomic, retain) id<VideoProcessDataDelegate> delegate;

+(VideoProcessCallbackDataObjc*)Instance;
- (void) onCaptureVideoFrame:(unsigned char *)frame length: (int)length width: (int)width height: (int)height;
- (void) onRenderVideoFrame:(NSString*)userId frame: (unsigned char *)frame length: (int)length width: (int)width height: (int)height;
@end




